package com.pdsu.alumni.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author Acerola
 * @since 2022-03-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Document(indexName = "sensitivewords")
@Accessors(chain = true)
@TableName("t_sensitivewords")
@ApiModel(value = "Sensitivewords对象", description = "")
@AllArgsConstructor
@NoArgsConstructor
public class SensitiveWords implements Serializable {

    private static final long serialVersionUID = 1L;


    @Id
    @Field(type = FieldType.Integer)
    private Integer id;
    @Field(type = FieldType.Keyword, analyzer = "ik_smart")
    private String keyword;
    @Field(type = FieldType.Keyword, analyzer = "ik_smart")
    private String type;

    public SensitiveWords(String keyword, String type) {
        this.keyword = keyword;
        this.type = type;
    }
}
